<?php
namespace app\admin\controller;

use think\Controller;
use think\Log;

class Index extends Common
{
    public function index()
    {
        $is_show = input("is_show",0);
        /** @var  查询 */
        $stock = C('STOCK_WARNING');
        $count = Db("sku_value")->where(["stock"=>['lt',$stock]])->group("goods_id")->count();
        if(empty($count)){
            $count = 0;
        }

	    $this->assign('title', '网站首页');
	    $this->assign('is_show', $is_show);
	    $this->assign('count', $count);
	    $this->assign('stock', $stock);
	    return $this->fetch();
    }


}
